home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
swags_z.zip
/
SCREEN.SWG
/
0003_CLRSCR3.PAS.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-05-28
|
752b
|
38 lines
{
MICHAEL NICOLAI
You want to clear the entire screen? Then just Write 00 in every Byte!
You have to save the screen first, of course. :-)
This Procedure saves the screen, clears it, waits For a keystroke and
then restores the screen:
}
Uses
Crt;
Procedure ClearScreen;
Const
lines = 50; { number of lines }
length = 160 * lines - 1;
Var
i : Word;
screen : Array [0..length] of Byte;
begin
{ save the screen }
For i := 0 to length do
screen[i] := mem[$B800 : i];
{ blank screen }
For i := 0 to length do
mem[$B800 : i] := 0;
{ wait For keystroke }
While (NOT KeyPressed) do;
{ restore screen }
For i := 0 to length do
mem[$B800 : i] := screen[i];
end;
begin
ClearScreen;
end.